package com.niit.agricstore.util;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import com.niit.agricstore.entity.User;
import com.niit.agricstore.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class ScheduleTask {
    @Autowired
    UserMapper userMapper;
//UserMapper
//    @Scheduled(cron="*/10 * * * * ?")
//    public void process(){
////业务操作
//        QueryWrapper queryWrapper = new QueryWrapper();
//        queryWrapper.between( "age",18,22);
//        List<User> list = userMapper.selectList(queryWrapper);
//        list.forEach(user -> {System.out.println("用户信息:" + user);
//});
//    }

}




